import java.util.*;

/**
 * @author LKQ
 * @date 2022/3/22 21:03
 * @description 一元二次方程求根
 */
public class Solution {
    public static void main(String[] args) {

    }
    public int arrangeCoins(int n) {
        return (int) ((Math.sqrt((long) 8 * n + 1) -1) / 2);
    }
}
